home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Development
/
Source
/
Speech Unit Source
/
UsesSpeechNew
next >
Wrap
Text File
|
1993-09-02
|
955b
|
40 lines
PROCEDURE TTextEntryDialog.GetTextBBAtItemBB(VAR theText:Str255;ItemNo:INTEGER);
VAR
CharIndex , theType:INTEGER;(* gives the type of the item requested *)
theTextHdl:Handle;(* gives a handle to the item *)
txtBox:Rect;(* gives the display rectangle of the item *)
aSpeaker , bSpeaker : TSpeaker ;
delayLen: LONGINT;
BEGIN
{Standard calls to get text from a dialogue box I made:}
GetDItem (fDialog, ItemNo, theType, theTextHdl, txtBox);
GetIText (theTextHdl, theText);
new(aSpeaker);
FailNIL(aSpeaker);
aSpeaker.ISpeaker(6);
new(bSpeaker);
FailNIL(bSpeaker);
bSpeaker.ISpeaker(9);
{
aSpeaker.SpeakStr(theText);
}
aSpeaker.SpeakTxt(theTextHdl);
{
Delay(6, delayLen);
Even without this, still there is noticable delay because it takes time
to read how to pronounce.
}
bSpeaker.SpeakTxt(theTextHdl);
aSpeaker.free;
bSpeaker.free;
END;